<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>结伴 - 骡窝窝</title>
    <meta name="viewport"
          content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui,viewport-fit=cover"/>
    <meta name="copyright" content="Copyright (c) 2006-2019 Mafengwo."/>
    <meta name="format-detection" content="telephone=no,address=no"/>
    <meta name="referrer" content="always"/>


    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css">
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/travel.css"/>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/common.js"></script>
    <link href="https://css.mafengwo.net/css/cv/mobile+css+head:mobile+css+ui^YVw^1550829726.css" rel="stylesheet"
          type="text/css"/>
    <link rel="stylesheet" href="/css/strategyComment.css" />
    <link href="https://css.mafengwo.net/mobile/css/together/together.css?1550829726" rel="stylesheet" type="text/css"/>


    <script type="text/javascript">
        window.Env = {
            "CNZZID": 30081550,
            "IS_MOBILE": true,
            "WWW_HOST": "www.mafengwo.cn",
            "IMG_HOST": "images.mafengwo.net",
            "W_HTTP": "https:\/\/w.mafengwo.cn",
            "P_HOST": "passport.mafengwo.cn",
            "P_HTTP": "https:\/\/passport.mafengwo.cn",
            "PAGELET_HTTP": "https:\/\/pagelet.mafengwo.cn",
            "JS_HOST": "js.mafengwo.net",
            "TONGJI_HOST": "tongji.mafengwo.cn",
            "UID": 46042572,
            "CSTK": "0c55c959d253ae079395c44e286cae7a_036f0a0be676ba3f6bbc3cde4cdb6444",
            "GOOGLE_MAP_KEY": "AIzaSyD-Su0x_rPy1xehlMBcMyTqWkU49Bk53nQ",
            "MOBILE_BINDED": true
        };
    </script>

    <script>
        $(function () {


            $(".btn-add").click(function () {
                if (!user) {//如果没登录点击就跳登录界面
                    $(document).dialog({
                        type: 'confirm',
                        closeBtnShow: true,
                        content: '请登陆后再执行相关操作!',
                        onClickConfirmBtn: function () {
                            window.location.href = "/login.html"
                        }
                    });
                }else {
                    window.location.href = "/mine/editTogetherTrip.html"
                }
            })

            var user = JSON.parse(sessionStorage.getItem("user"));
            // 当前页
            var currentPage = 1;
            // 总页数
            var pages;
            // 存储游记的数组
            var travelArr = [];

            function query() {
                // 获取全部游记
                $.get(baseUrl + "/togetherTrips", {currentPage: currentPage,pageSize:8}, function (data) {
                    // 把第二个数组合并第一个数组中
                    $.merge(travelArr, data.list);
                    var json = {
                        list: travelArr
                    };
                    // 渲染数据
                    $("#allTogethers").renderValues(json, {
                        getHref: getHref
                    });
                    // 获取总页数
                    pages = data.pages;
                })
                currentPage = currentPage + 1;
            }

            // 默认查询第一页
            query();
            // 给window绑定滚动事件
            $(window).scroll(function () {
                if ($(window).height() + $(document).scrollTop() >= $(document).height()) {
                    // 如果是小于总页数就发送请求
                    if (currentPage <= pages) {
                        query();
                    } else {
                        $(document).dialog({
                            type: 'notice',
                            content: '<span class="info-text">我是有底线的!</span>',
                            autoClose: 1500
                        });
                    }
                }
            });






        });


    </script>


</head>

<div class="search-head">
    <div class="row nav-search">
        <div class="col">
            <a href="/" class="my-arrow">
                <span><i class="fa fa-chevron-left"></i></span>
            </a>
        </div>
        <div class="col">
            <span>骡窝窝--结伴</span>
        </div>
        <div class="col"></div>
    </div>
</div>
<body>


<section class="container" data-from="">
    <div class="top-num">
        <img style="margin-top: 10px" src="upload/xxxx.png">
        <div class="vam">
            <ul>
                <li>
                    <span><em>看上就挑走</em></span>
                </li>
            </ul>
        </div>
    </div>


    <div class="lists">
        <ul class="clearfix _j_together_list" id="allTogethers">
                <div render-loop="list">
                        <a render-key="list.id" render-fun="getHref" data-url="/togetherContent.html?id=">
                            <div class="cover">
                                <img render-src="list.coverUrl">
                                <div class="title">
                                    <h3 render-html="list.region.name" ></h3>
                                    <span render-html="list.travelDays" ></span>
                                </div>
                                <span class="departure-date" render-html="list.goTimeStr"></span>
                            </div>
                            <div class="info">
                        <span class="avatar"><img render-src="list.author.headImgUrl"></span>
                                <span  render-html="list.author.genderName"></span>
                                <span class="name"  render-html="list.author.nickName">Timez</span>
                                <span class="level">lv 32</span>
                                <span class="location" render-html="list.author.place"></span>
                                <p class="txt" render-html="list.intro"></p>
                            </div>
                        </a>
                </div>

        </ul>

    </div>

    <div class="fixed-btm _j_sort_html">
        <div class="btn-group">
            <!-- <a class="btn-add _j_not_logo" data-error="lv">发起结伴</a>-->
            <a class="btn-add _j_not_logo" href="#">发起结伴</a>
        </div>
    </div>


</section>
<div class="overlay _j_overlay"></div>


<!--<script language="javascript" src="https://js.mafengwo.net/mobile/js/mate/t_index.js?1550829730" type="text/javascript"
        crossorigin="anonymous"></script>


<script language="javascript" type="text/javascript">
    if (typeof M !== "undefined" && typeof M.loadResource === "function") {
        M.loadResource("https://js.mafengwo.net/js/cv/mobile+js+BindMobilePop:mobile+js+ALogin:js+ACnzzGaLog:js+ARecruit:js+ALazyLoad:mobile+js+wakeApp:mobile+js+omc.global^YlRb^1558975785.js");
    }
</script>-->

</body>
</html>
